export let mediaPlay = function(selector, Cselector) {
    let play = true;
    let media = $(selector)[0];
    let controller = $(Cselector);
    controller.show();
    playHandle(selector);
    document.addEventListener("WeixinJSBridgeReady", function() {
        playHandle(selector)
    }, false);

    function playHandle(selector) {
        media.play();
    }
    controller.on('touchstart', function() {
        if (play) {
            media.pause();
            $(this).removeClass('spin')
        } else {
            media.play();
            $(this).addClass('spin')
        }
        play = !play;
    })
}